﻿using System;
using System.Collections.Generic;

class Program
{
    static void ReverseDigits(List<int> ListOfInts, decimal numberToReverse)
    {
        int i = numberToReverse.ToString().Length;
        for (int j = 0; j < i; j++)
        {
            ListOfInts.Add((int)numberToReverse % 10);
            numberToReverse = numberToReverse / 10;
        }
        Console.WriteLine();
        foreach(int value in ListOfInts)
        {
            Console.Write(value);
        }
    }
    static void Main()
    {
        Console.WriteLine("Enter a number to reverse it's digits:");
        decimal numberEntered = decimal.Parse(Console.ReadLine());
        List<int> ListOfDigits = new List<int>();
        ReverseDigits(ListOfDigits, numberEntered);
    }
}

